clear all
cap log close
set more off

// Define subdirectory locations ----------
global code = "${proj}/code"
global data = "${proj}/data"
global est  = "${proj}/estimates"
global out  = "${proj}/output"
global temp = "${proj}/_temp"
global log  = "${proj}/logs"
// ---------------------------------------

* initialize log file -------------------
log using "${log}/03-iv_analysis.log", text replace 

* run subprograms: IV analysis ------------------------
do "${code}/iv_analysis/01-naive.do"
do "${code}/iv_analysis/02-reduced_form.do"
do "${code}/iv_analysis/03-iv_tables.do"
do "${code}/iv_analysis/04-selection.do"
do "${code}/iv_analysis/05-alt_instruments.do"
do "${code}/iv_analysis/06a-mono_data.do"
rscript using "${code}/iv_analysis/06b-mono_output.R", args("${proj}" "${rlib}")
do "${code}/iv_analysis/07-heterogeneity.do"
do "${code}/iv_analysis/08-learning.do"
do "${code}/iv_analysis/09a-mte_bootstrap.do"
do "${code}/iv_analysis/09b-mte_output.do"
* ----------------------------------------------------

* end log file ---------------------------------------
log close    




